//9:输入一个整数，判断其是否是回文数，回文数是指这个数颠倒后，和原数相同那个。
package ZUOYE0421;

import java.util.Scanner;

public class 更改作业9 {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		System.out.println("输入一个数：");
		int num = in.nextInt();
		int num1 = num;
		int a = 0;
		for (; num % 10 != num;) {
			a = (a + num % 10) * 10;
			num = num / 10;
		}
		if ((a + num) == num1) {
			System.out.println("该为回文数");
		} else {
			System.out.println("该不为回文数");
		}
	}
}